<?php
header('Content-type: text/x-json');
require_once('../lib/config.php');
require_once('../lib/JSON.php');

$id = (int)$_GET['id'];

$user = new $whatsit_user_class();
$db = new $whatsit_database_class($user->getUserName());

$whatsit = $db->getWhatsit($id);

$pref_array = $whatsit->getPreferenceArray();

$json = new Services_JSON();
$output = $json->encode($pref_array);

print($output);
